FileList

see the source

Author: David Li

Execution cost: less than 418 gas

Deployment cost: less than 382200 gas

Combined cost: less than 382618 gas

Events

fileAdded(uint256,string,bytes32)

Execution cost: No bound available

Params:

  1. fileid of type uint256
  2. ipfshash of type string
  3. _filename of type bytes32

tagsAdded(bytes32[5])

Execution cost: No bound available

Params:

  1. tags of type bytes32[5]

Methods

addFile(string,bytes32,bytes32[5])

updates mappings todos and lastIds

Add a file to the list

Execution cost: No bound available

Params:

  1. ipfshash of type string

    an ipfshash returned after an image is finished uploaded

  2. _filename of type bytes32

    name of file as a bytes32 as filenames should be short

  3. tags of type bytes32[5]

    array of bytes32 used for sorting/searching files (e,g. blockchain, school, textbook)


files(address,uint256)

Execution cost: No bound available

Attributes: constant

Params:

  1. param_0 of type address
  2. param_1 of type uint256

Returns:

  1. id of type uint256
  2. ipfshash of type string
  3. filename of type bytes32
  4. owner of type address
  5. timestamp of type uint256

getFileTags(address,uint256)

return the tags for a specific file

Execution cost: No bound available

Attributes: constant

Params:

  1. owner of type address

    --- address of person who uploaded the file

  2. _index of type uint256

    --- the file desired, (first file uploaded, second , etc ...)

Returns:

  1. output_0 of type bytes32[5]

lastIds(address)

Execution cost: less than 575 gas

Attributes: constant

Params:

  1. param_0 of type address

Returns:

  1. output_0 of type uint256

maxAmountOfFiles()

Execution cost: less than 272 gas

Attributes: constant

Returns:

  1. output_0 of type uint256

Back to the top ↑